const baseURL = "https://guoshengzichan.com/api";
export const $http = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseURL + options.url,
			data: options.data || {},
			header: {
				token: uni.getStorageSync('token') || ''
			},
			method: options.method || "GET",
			success(res) {
				
				resolve(res.data);
			},
			fail(err) {
				reject(err.message);
			},
		});
	});
};
